package com.google.code.tcx2nike;

import java.util.Date;

/**
 * Represents the workout data store 
 * in a Garmin tcx XML file.
 * 
 */
public class GarminWorkoutData {
	def tcxFile
	def node

	GarminWorkoutData(f) {
		tcxFile = f
		node = new XmlParser().parse(tcxFile)
	}

	def process() {
		println node.name()
	}

	/**
	 * Returns the of the start time of workout as java.util.Date
	 */
	def Date getStartTime(){
		//TODO: fill in code to read the start date and time from the xml file

		//returns current date and time
		return new Date()
	}

	/**
	 * Returns the total duration of the workout in seconds.
	 */
	def Long getDuration(){
		//TODO: fill in code to read total duration from the xml file

		return 0L
	}

	/**
	 * Returns the total distance of the workout in km.
	 */
	def Double getDistance(){
		//TODO: fill in code to read total distance from the xml file

		return 0.0
	}

	def Double getWeight(){
		//TODO: fill in code to read weight from the xml file

		return 0.0
	}
	

}

